
const admin  = 'xyadmin'
const user  = 'userInfo'
export function getToken(){
  return localStorage.getItem(admin)
}
export function setToken(token){
  localStorage.setItem(admin,token)
}
export function removeToken(){
  localStorage.removeItem(admin)
}
export function getInfo(){
  let item = localStorage.getItem(user) 
  return JSON.parse(item)
}
export function setInfo(info){
  let item = JSON.stringify(info)
  localStorage.setItem(user,item)
}
export function removeInfo(){
  localStorage.removeItem(user)
}
